module.exports = (app)=>{
    const express = require('express');
    const router = express.Router();
    const {adminLoginMiddleWare,adminAddMiddleWare,adminShowMiddleWare,deleteAdminByIdMiddleWare,selectAdminByIdMiddleWare,modifyAdminByIdMiddleWare} = require('../../middleware/admin');
    router.post('/login',adminLoginMiddleWare);
    router.post('/add',adminAddMiddleWare);
    router.get('/show',adminShowMiddleWare);
    router.get('/delete/:id',deleteAdminByIdMiddleWare);
    router.get('/search/:id',selectAdminByIdMiddleWare);
    router.post('/modify',modifyAdminByIdMiddleWare);
    app.use('/api/admin',router);
}